/**
 * 自定义Text组件，设置了一些属性的默认值：fontSize、fontFamily
 * @author TianGui (2696765101@qq.com)
 */
import React, { Component } from 'react';
import { Text } from "react-native";

export default class MyText extends /*Text*/ React.Component {

    static defaultFontFamily = '微软雅黑';

    render() {
        // console.log('AAA', this); // FIXME --- this对象过大，log输出大约需要10秒，导致 render() 超时
        console.log('AAA', this.props);
        console.log('AAA', this.props.children);

        console.log('AAA', 'defaultFontFamily', MyText.defaultFontFamily);

        return (
            <Text style={{ fontSize: 30, fontFamily: MyText.defaultFontFamily }}>
                {this.props.children}
            </Text>
        );
    }

}
